import VueRouter from "vue-router";
import Vue from "vue";
import Home from "@/views/Home.vue";
import Search from "@/views/Search.vue";
import NotFound from "@/views/NotFound.vue";

Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/home" },
    { path: "/home", component: Home },
    { path: "/search", component: Search },
    { path: "/search/:words?", component: Search },
    { name:'search1',path: "/search", component: Search },
    { name:'search2',path: "/search/:words?", component: Search },
    { path: "*", component: NotFound },
  ],
});

export default router;
